import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "Home",
      component: () => import("../views/home.vue"),
      redirect: {
        name: "Config",
      },
      children: [
        {
          path: "config",
          name: "Config",

          component: () => import("../views/ConfigView.vue"),
        },
        {
          path: "album",
          name: "Album",

          component: () => import("../views/album.vue"),
        },
        {
          path: "capacity",
          name: "Capacity",

          component: () => import("../views/capacity.vue"),
        },
        {
          path: "content",
          name: "Content",

          component: () => import("../views/content.vue"),
        },
        {
          path: "order",
          name: "Order",

          component: () => import("../views/order.vue"),
        },
        {
          path: "user",
          name: "User",

          component: () => import("../views/user.vue"),
        },
      ],
    },

    {
      path: "/login",
      name: "Login",

      component: () => import("../views/login.vue"),
    },
  ],
});

export default router;
